package org.liushengpei.com.controller;

import org.liushengpei.com.service.IGoodsInfoService;
import org.liushengpei.com.util.result.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商品信息controller
 */
@RestController
@RequestMapping(value = "/goods")
public class GoodsDetailController {

    @Autowired
    private IGoodsInfoService infoService;


    /**
     * 获取商品详细信息
     */
    @GetMapping(value = "/getGoodsDetail")
    public ResultData getGoodsDetail(String id) {
        return ResultData.success(infoService.getGoodsInfoById(id));
    }
}
